package ObjectOutputStream.project;

import java.io.Serializable;

/*
    创建学生类，用于传递对象
 */
public class Student implements Serializable { //实现这个接口，就相当于形成了一个序列号

    private static final long serialVersionUID = 1;  //给定一个固定的序列号，类型必须是long，名字为serialVersionUID
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
}
